package com.cyy.spring;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * @Author: Cyy
 * @Description: 织入类AroundInteceptor
 * @Date:Created in 19:40 2018/7/19
 */
public class AroundInteceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println(methodInvocation.getMethod().getName()+"调用之前");
        Object res=methodInvocation.proceed();
        System.out.println(methodInvocation.getMethod().getName()+"调用之后");
        return res;
    }
}
